﻿@model IEnumerable<FilmBookingTicket.Models.Film>

@{
    ViewBag.Title = "Quản lí phim";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";

}

<h2>Phim</h2>

<p>
    @Html.ActionLink("Thêm Phim", "Create")
</p>
<table class="table striped bordered hovered" style="margin :0px 0px 0px 40px">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Length)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Nation)
        </th>
        <th></th>
               <th>
            @Html.DisplayNameFor(model => model.AgeLimit)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Format.FormatName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Category.CategoryName)
        </th>
        <th></th>
              
       
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Length)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Nation)
        </td>
      <td>
          @Html.DisplayFor(modelItem => item.Actor_FilmId)
      </td>
        <td>
            @Html.DisplayFor(modelItem => item.AgeLimit)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Format.FormatName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Category.CategoryName)
        </td>
        <td></td>
        <td>
            @Html.ActionLink("Sửa", "Edit", new { id=item.FilmId }) |
            @Html.ActionLink("Chi tiết", "Details", new { id=item.FilmId }) |
            @Html.ActionLink("Xóa", "Delete", new { id=item.FilmId })
        </td>
    </tr>
}

</table>
